resolved: limit the number of signature validations in a transaction
authorRonan Pigott <ronan@rjp.ie>
Sun, 25 Feb 2024 01:21:24 +0000 (18:21 -0700)
committerArnaud Rebillout <arnaudr@debian.org>
Mon, 13 Apr 2026 07:18:40 +0000 (14:18 +0700)
commit02c83d9bcf24bee49b3532207717b9d4228ff1fe
treea6f5b66697a8292b63ae304f965084bef83e1a2f
parent3ff63ca55bd984a25a2a44e891586ee27b4e894b
resolved: limit the number of signature validations in a transaction

It has been demonstrated that tolerating an unbounded number of dnssec
signature validations is a bad idea. It is easy for a maliciously
crafted DNS reply to contain as many keytag collisions as desired,
causing us to iterate every dnskey and signature combination in vain.

The solution is to impose a maximum number of validations we will
tolerate. While collisions are not hard to craft, I still expect they
are unlikely in the wild so it should be safe to pick fairly small
values.

Here two limits are imposed: one on the maximum number of invalid
signatures encountered per rrset, and another on the total number of
validations performed per transaction.

Gbp-Pq: Name 0002-resolved-limit-the-number-of-signature-validations-i.patch
src/resolve/resolved-dns-dnssec.c
src/resolve/resolved-dns-dnssec.h
src/resolve/resolved-dns-transaction.c